#include<string>

std::string Double2(double num)
{
    return std::to_string ((1.0*(int)(num*100))/100);
}

std::string Transform(size_t size)
{
    if (size < 1024)
        return std::to_string(size) + "B";
    else if (size < 1024 * 1024)
    {
        return Double2((1.0 * size) / 1024) + "KB";
    }
    else if (size < 1024 * 1024 * 1024)
    {
        return Double2((1.0 * size) / (1024 * 1024)) + "MB";
    }
    else
    {
        return Double2((1.0 * size) / (1024 * 1024 * 1024)) + "GB";
    }
}